'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;

  router.all('*.do', controller.app.proxy);
  router.all('/baiduApi/*', controller.app.baiduApi);
  router.get('/logout', controller.app.logout);
  router.post('/phoneLogin', controller.app.phoneLogin);
  router.post('/login', controller.app.login);
  router.post('/regist', controller.app.regist);
  router.post('/refreshUserInfo', controller.app.refreshUserInfo);
  router.get('/*', controller.app.index);
};